<?php

use Swoole\Table;

return [
    // ip限流
    'dd_auth_ip_whitelist' => [
        'size' => 1024 * 128, //指定数据库内存大小
        'columns' => [
            'ip' => [
                'type' => Table::TYPE_STRING,
                'size' => 16,
            ],
            'count' => [
                'type' => Table::TYPE_INT,
                'size' => 8,
            ],
            'lastAccessTime' => [
                'type' => Table::TYPE_INT,
                'size' => 8,
            ],
        ],
    ],
    //高性能内存数据库
    'dd_diandi_watches_job' => [
        'size' => 20480, //指定数据库内存大小
        'columns' => [
            'member_id' => ['type' => Table::TYPE_INT, 'size' => 50],
            'device_id' => ['type' => Table::TYPE_INT, 'size' => 50],
            'content_type' => ['type' => Table::TYPE_STRING, 'size' => 50],
            'content' => ['type' => Table::TYPE_INT, 'size' => 50],
            'time' => ['type' => Table::TYPE_INT, 'size' => 50], //内置字段，自行设置
            'remark' => ['type' => Table::TYPE_INT, 'size' => 50],
            'data' => ['type' => Table::TYPE_STRING, 'size' => 255],
            'fd' => ['type' => Table::TYPE_INT, 'size' => 50], //内置字段，自行设置
        ],
    ],
    'dd_diandi_receptacle_dev_fd' => [
        'size' => 20480, //指定数据库内存大小
        'columns' => [
            'device_id' => ['type' => Table::TYPE_STRING, 'size' => 50],
            'fixed_data' => ['type' => Table::TYPE_STRING, 'size' => 255],
            'fd' => ['type' => Table::TYPE_INT, 'size' => 50], //内置字段，自行设置
            'websocket_fd' => ['type' => Table::TYPE_INT, 'size' => 50], //内置字段，自行设置
        ],
    ],
    'dd_diandi_selling_dev_fd' => [
        'size' => 20480, //指定数据库内存大小
        'columns' => [
            'Imei' => ['type' => Table::TYPE_STRING, 'size' => 50],
            'MsgId'=> ['type' => Table::TYPE_INT, 'size' => 50],
            'fixed_data' => ['type' => Table::TYPE_STRING, 'size' => 255],
            'fd' => ['type' => Table::TYPE_INT, 'size' => 50], //内置字段，自行设置
            'websocket_fd' => ['type' => Table::TYPE_INT, 'size' => 50], //内置字段，自行设置
        ],
    ],
    'dd_diandi_watches_dev_fd' => [
        'size' => 20480, //指定数据库内存大小
        'columns' => [
            'device_id' => ['type' => Table::TYPE_INT, 'size' => 50],
            'fd' => ['type' => Table::TYPE_INT, 'size' => 50], //内置字段，自行设置
            'websocket_fd' => ['type' => Table::TYPE_INT, 'size' => 50], //内置字段，自行设置
        ],
    ]
];